const { getById } = require('../persistences/home')

const get = (req, res) => {
  getById() // todo mongodb
  res.statusCode = 400
  res.json({
    code: '1001',
    msg: 'fail',
    data: {
      id: 1,
    },
  })
}

const save = (req, res) => {
  res.statusCode = 200
  res.json({
    code: '0000',
    msg: 'ok',
    data: req.body,
  })
}

module.exports = { get, save }
